
import Vue from 'vue'

Vue.filter('fomateDate', function (val) {
  var date = new Date(val)
  var year = date.getFullYear()
  var mon = (date.getMonth() + 1 + '').padStart(2, 0)
  var day = (date.getDate() + '').padStart(2, 0)
  var hh = (date.getHours() + '').padStart(2, 0)
  var mm = (date.getMinutes() + '').padStart(2, 0)
  var ss = (date.getSeconds() + '').padStart(2, 0)
  return `${year}-${mon}-${day} ${hh}:${mm}:${ss}`
})
